package com.igeek.boot;

import org.springframework.boot.ConfigurableBootstrapContext;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.stream.Stream;

@SpringBootApplication
public class HelloSpringBootApplication {
    public static void main(String[] args) {
        //just run 得到IOC容器
        ConfigurableApplicationContext context = SpringApplication.run(HelloSpringBootApplication.class, args);
        //得到IOC容器中 所有的bean定义信息
        String[] beanDefinitionNames = context.getBeanDefinitionNames();
        Stream.of(beanDefinitionNames).forEach(System.out::println);
    }
}